/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-08 17:53:06
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-05-27 10:25:48
 * @FilePath: \ken147258.topayClient\src\api\other\pay_product.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  // list: '/platformApi/pay_product/list',
  payProductList: '/skfApi/payProduct/payProductList',
  proList: '/skfApi/payProduct/pro/list',
  payProductDetailList: '/skfApi/payProduct/payProductDetailList',
  deletePaymentDetailInfo: '/skfApi/payProduct/deletePaymentDetailInfo',
  addPaymentDetailInfo: '/skfApi/paymentOrder/addPaymentDetailInfo',
  msProductList: '/skfApi/msProductList',
  subordinateProductList: '/skfApi/payProduct/subordinateProductList',
  updateSubMsProductRatio: '/skfApi/updateSubMsProductRatio',
  subordinatePayproductUpdate: '/skfApi/payProduct/subordinatePayproductUpdate',
  updateChildMs: '/skfApi/updateChildMs',
  closeChilMsHandleOrderStatus: '/skfApi/closeChilMsHandleOrderStatus',
  updatePaymentDetailInfo: '/skfApi/payProduct/updatePaymentDetailInfo',
  updateMs: '/skfApi/updateMs',
};

// export function list(data: object): AxiosPromise<any> {
//   return request({
//     url: URL.list,
//     method: "get",
//     params: data,
//   });
// }

export function payProductList(): AxiosPromise<any> {
  return request({
    url: URL.payProductList,
    method: "get",
  });
}

export function proList(params: Object): AxiosPromise<any> {
  return request({
    url: URL.proList,
    method: "get",
    params,
  });
}

export function payProductDetailList(params: Object): AxiosPromise<any> {
  return request({
    url: URL.payProductDetailList,
    method: "get",
    params,
  });
}

export function deletePaymentDetailInfo(params: Object): AxiosPromise<any> {
  return request({
    url: URL.deletePaymentDetailInfo,
    method: "post",
    data: params,
  });
}

export function addPaymentDetailInfo(params: Object): AxiosPromise<any> {
  return request({
    url: URL.addPaymentDetailInfo,
    method: "post",
    data: params,
  });
}

export function updateSubMsProductRatio(params: Object): AxiosPromise<any> {
  return request({
    url: URL.updateSubMsProductRatio,
    method: "post",
    data: params,
  });
}

export function subordinatePayproductUpdate(params: Object): AxiosPromise<any> {
  return request({
    url: URL.subordinatePayproductUpdate,
    method: "post",
    data: params,
  });
}

export function updateChildMs(params: Object): AxiosPromise<any> {
  return request({
    url: URL.updateChildMs,
    method: "post",
    data: params,
  });
}

export function closeChilMsHandleOrderStatus(params: Object): AxiosPromise<any> {
  return request({
    url: URL.closeChilMsHandleOrderStatus,
    method: "post",
    data: params,
  });
}

export function updatePaymentDetailInfo(params: Object): AxiosPromise<any> {
  return request({
    url: URL.updatePaymentDetailInfo,
    method: "post",
    data: params,
  });
}

export function updateMs(params: Object): AxiosPromise<any> {
  return request({
    url: URL.updateMs,
    method: "post",
    data: params,
  });
}

export function msProductList(params: Object): AxiosPromise<any> {
  return request({
    url: URL.msProductList,
    method: "get",
    params: params,
  });
}
export function subordinateProductList(params: Object): AxiosPromise<any> {
  return request({
    url: URL.subordinateProductList,
    method: "get",
    params: params,
  });
}
